/*
 * @author ${user}
 * @date ${year}-${month}-${day}
 */

package net.xdclass.manager.impl;

import net.xdclass.manager.ProductManager;
import net.xdclass.mapper.ProductMapper;
import net.xdclass.model.ProductDO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class ProductManagerImpl implements ProductManager {
	@Autowired
	private ProductMapper productMapper;

	@Override
	public List list() {
		List <ProductDO> list = productMapper.selectList(null);
		return list;
	}

	@Override
	public ProductDO detail(Long product_id) {
		ProductDO productDO = productMapper.selectById(product_id);
		return productDO;
	}
}
